home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
NEWSOFT
/
AUGUST
/
WORKDISC
/
!Forthmacs
/
risc_os
/
whatis_doc
< prev
next >
Wrap
Text File
|
1997-05-08
|
57KB
|
1,695 lines
! n addr --
Stores a number at addr
!csp --
Remembers the stack pointer
"" -- pstr ccc
Collects a word from the input stream
", addr len --
Places a string at the top of the dictionary
". pstr --
Displays a packed string. Equivalent to COUNT TYPE
"cat start-pstr end-pstr --
Appends the packed string at start-pstr to the end of the other one
"compile pstr --
Compiles or interprets a word
"copy from-pstr to-pstr --
Copies a packed string from from-pstr to to-pstr
"create pstr --
Defines a word from a packed string on the stack
"load filename-pstr --
Loads the file whose name is the packed string on the stack
"move pstr1 pstr2 -- pstr2
Moves a packed string from pstr1 to pstr2
"shell str -- flag
Call the Risc OS command line handler and start a shell in case
"task: size name --
Create a new task
"temp -- addr
Address of a temporary string
# ud1 -- ud2
Converts a digit in pictured numeric output
#> ud -- addr u
Ends pictured numeric output
#align -- n
The alignment granularity for the cpu; 2 for 68000; 4 for SPARC and ARM
#columns -- n
The number of text columns on the screen
#fbufs -- n
The number of file buffers
#fds -- n
The number of file descriptors available for use by FLOAD
#line -- addr
USER variable containing the line number on the output device
#lines -- n
The number of text lines on the screen
#out -- addr
USER variable containing the column number on the output device
#s ud1 -- ud2
Converts the rest of the digits in pictured numeric output
#threads -- n
The number of threads used by the dictionary hashing scheme
#tib -- addr
Size of Terminal Input Buffer
#times -- addr
The number of times to re-interpret command line
#user -- addr
The first unused USER area offset
#vocs -- n
The number of vocabularies that can be in the search order at one time
' -- acf name
Finds a word in the dictionary
'tib -- addr
USER variable containing the address of the terminal input buffer
'user -- name
Assembles the addressing mode for a User variable
'user# -- user# name
Finds the USER number associated with the word if there is one
'word -- pstr
The address where WORD puts its packed string
( -- ccc)
Begins a comment
(") -- addr len
Run-time word compiled by "
("s) -- pstr
Run-time word compiled by [""]
(#lines -- n
The number of text lines on the screen
(') -- acf
Run-time word compiled by [']
(+loop) n --
Run-time word compiled by +LOOP
(.") --
Run-time word compiled by ."
(.) n -- addr len
Converts a signed number to a character array
(.s --
Displays the contents of the data stack
(;code) --
Run-time word compiled by ;CODE and DOES>
(?do) end start --
Run-time word compiled by ?DO
(?leave) flag --
Run-time word compiled by ?LEAVE
(abort --
The default implementation of ABORT
(abort") flag --
Run-time word compiled by ABORT"
(bye --
The Default implementation of BYE
(cd pathname-pstr -- error?
Change current directory
(cold-hook --
The Default implementation of COLD-HOOK
(create -- name
The default implementation of CREATE
(delete filename-pstr --
Deletes a file
(do) end start --
Run-time word compiled by DO
(emit char --
Displays a character
(endcase) selector --
Run-time word compiled by ENDCASE
(endof) --
Run-time word compiled by ENDOF
(files match-pstr --
Displays file names matching pattern
(forget) acf --
Reclaims the dictionary space after addr
(interactive? -- flag
True if the input stream is interactive
(interpret --
The Default implementation of INTERPRET
(is action-acf deferred-acf --
Installs a new action in a deferred word
(is) action-acf --
Run-time word compiled by IS
(key -- char
Used by the default implementation of KEY
(leave) --
Run-time word compiled by LEAVE
(literal? pstr -- pstr false | literal true
The Default implementation of LITERAL?
(load fd --
Loads the file whose file descriptor is fd
(loop) --
Run-time word compiled by LOOP
(md path-pstr -- ?error
Make a new directory
(more --
Display file, pausing at end of screen
(newexpect addr +n --
The implementation of EXPECT enabled by the line editor
(number pstr -- d
The Default implementation of NUMBER
(of) selector test -- [selector]
Run-time word compiled by OF
(patch new-number old-number acf --
Substitutes new-number for first instance of old-number after acf
(pause --
The multitasking scheduler, installed in pause.
(prompt --
The Default implementation of PROMPT
(quit --
The Default implementation of QUIT
(rd path-pstr --
Delete a directory.
(rename old-name-pstr new-name-pstr --
Renames a file
(restart --
restart Forthmacs after a hardware crash
(rstrace end-addr start-addr --
Displays words nested on the return stack image between end and start
(s -- stack-comment
Alternate form of stack comment
(see) acf --
Decompiles the word
(set-relocation-bit addr -- addr
The Default implementation of SET-RELOCATION-BIT
(size pattern-pstr --
Shows the sizes of all files matching pattern-pstr
(tail --
Display the end of the file, pausing at end of screen
(type addr +n --
A possible implementation of TYPE
(u.) u -- addr len
Convert an unsigned number to a character array
(warm-hook --
The Default implementation of WARM-HOOK
(where --
The Default implementation of WHERE
(word char -- pstr
The Default implementation of WORD
* n1 n2 -- n3
Multiplies n1 times n2
*/ n1 n2 n3 -- n4
n1*n2/n3
*/mod n1 n2 n3 -- n4 n5
n4 is remainder, n5 is quotient of n1*n2/n3
+ n1 n2 -- n3
Adds n1+n2
+! n|u addr --
Adds n to the number stored at addr
+bp adr --
Adds a breakpoint to the list.
+dis --
Continues disassembling from the last stopping point
+fseek offset fd --
Changes the position within a file
+loop n --
Ends DO .. +LOOP construct; adds n to loop index
+str pstr -- addr
Finds the end of the packed string at pstr
, n --
Places a number in the dictionary
," -- ccc"
Places a string at the top of the dictionary
- n1 n2 -- n3
Subtracts n1-n2
--bp --
Removes the most-recently-set breakpoint
-bp adr --
Removes a breakpoint from the list.
-rot n1 n2 n3 --- n3 n1 n2
Shuffles top 3 stack items
-trailing addr +n1 -- addr +n2
Removes trailing spaces
. n --
Displays a number
." -- ccc"
Compiles a string for later display
.( -- ccc)
Displays a string immediately
.bp --
Displays the breakpoint list.
.breakpoint --
Displays the machine state when the system stops at a breakpoint.
.buffers --
displays a list of buffers
.calls acf --
Shows all the words which call the word acf
.current-word ip --
Displays the name of a word given any address within its body
.d n --
Displays n in decimal without changing BASE
.date day month year --
Displays the date from numbers on the stack
.dir --
Prints the current directory name
.disk-free --
Shows the number of free bytes on the current drive
.dispose --
remove all links into transient address space
.id anf --
Displays the name of a word from its name field address
.instruction --
Displays the instruction at the current breakpoint address.
.month month --
Displays the name of the numbered month
.name acf --
Displays the name of a word from its compilation address
.now --
Displays the current time
.pointers --
displays pointers
.r n +n --
Displays a number in a fixed width field
.registers --
Displays the CPU registers from the last breakpoint or exception.
.s --
Displays the contents of the data stack
.sr --
Decodes and displays the contents of the saved Status Register
.stack --
Displays the Data Stack saved at the last breakpoint or exception
.step --
Displays the machine state when the system stops at a step
.tab string-length --
Advances to the next output field
.task --
Displays task information
.tasks --
Displays tasks
.time seconds minutes hours --
Displays the time from numbers on the stack
.today --
Displays today's date
.version --
Displays the version number of the Forth system
.x n --
Displays n in hex without changing BASE
/ n1 n2 -- n3
Divides n1/n2
/cell -- n
The number of bytes in a normal; 4
/char -- n
The number of bytes in a character; 1
/fbuf -- n
The number of bytes in a file buffer
/fd -- n
The number of bytes in a file descriptor
/link -- n
The number of bytes in a dictionary link; 4
/mod n1 n2 -- n3 n4
n3 is remainder, n4 is quotient of n1/n2
/token -- n
The number of bytes in a compiled address; 4
0< n -- flag
Is n < 0 ?
0<= n -- flag
True if n is less than or equal to zero
0<> n -- flag
True if n is not equal to zero
0= n -- flag
Is n = 0 ?
0> n -- flag
Is n > 0 ?
0>= n -- flag
True if n is greater than or equal to zero
1+ n1 -- n2
Add 1
1- n1 -- n2
Subtracts 1
16-bit --
Aborts since this isn't a 16-bit system
16\ --
Ignores rest of line since this isn't a 16-bit system
2! n1 n2 addr --
Stores 2 numbers at addr
2* n1 -- n2
Multiplies by 2
2+ n1 -- n2
Adds 2
2- n1 -- n2
Subtracts 2
2/ n1 -- n2
Divides by 2
2@ addr -- n1 n2
Fetches 2 numbers from addr
2constant n1 n2 --
Defines a 2-number constant
2drop n1 n2 --
Removes 2 numbers from stack
2dup n1 n2 -- n1 n2 n1 n2
Duplicates 2 numbers
2literal -- d
Compiles a double number
2over n1 n2 n3 n4 -- n1 n2 n3 n4 n5 n6
Copies 2 numbers
2rot n1 n2 n3 n4 n5 n6 -- n3 n4 n5 n6 n1 n2
Rotates 3 pairs of numbers
2swap n1 n2 n3 n4 -- n3 n4 n1 n2
Exchanges 2 pairs of numbers
2variable --
Defines a variable for 2 numbers
32-bit --
Does nothing, since this is a 32-bit system
32\ --
Interprets rest of line since this is a 32-bit system
3dup a b c -- a b c a b c
Duplicates 3 stack items
4* n1 -- n2
Multiplies by 4; use /N* instead
4dup a b c d -- a b c d a b c d
Duplicates 4 stack items
8* n1 -- n2
Multiplies by 8
: -- sys name
Starts the compilation of a new colon definition
; --
Finishes the compilation of a colon definition
;code --
Begins assembling the run-time action for CREATE ... ;CODE words
;code --
Begins assembling the run-time action for create ... ;code words
< n1 n2 -- flag
Is n1 < n2 ?
<# --
Initialises pictured numeric output
<= n1 n2 -- flag
True if n1 is less than or equal to n2
<> n1 n2 -- flag
True if n1 is not equal to n2
<mark -- addr
Remembers target of backward branch
<resolve addr --
Finishes a backward branch
= n1 n2 -- flag
Is n1 = n2 ?
> n1 n2 -- flag
Is n1 > n2 ?
>= n1 n2 -- flag
True if n1 is greater than or equal to n2
>body acf -- apf
Finds the parameter field address from the compilation address
>data acf -- addr
Finds the data storage address for the word at acf
>in -- addr
USER Variable containing input stream offset; Implemented in extend.block
>link acf -- alf
Finds link field address from compilation address
>mark -- addr
Remembers the location of forward branch
>name acf -- anf
Finds name field address from compilation address
>number ud1 addr1 u1 -- ud2 addr2 u2
converts string addr1/u1 to a number, addr2/u2 tell about unused chars
>r n --
Moves a number to the return stack
>relbit addr -- offset rel-table-addr
Converts addr to a bit offset and the relocation table address
>resolve addr --
Finishes a forward branch
>tab --
Advanve the cursor to the next TAB position
>threads voc-acf -- addr
Finds the threads for a vocabulary
>type addr +n --
Displays characters and stores them at PAD
>user apf -- user-var-addr
Finds a USER number that is in the parameter field
>user# acf -- user#
Finds the USER number associated with the word if there is one
? addr --
Displays the contents of a variable
??cr --
New line if not already at left side of line
?branch flag --
High-level conditional branch
?comp --
Aborts if not compiling
?cr --
New line if fewer than no space left on this one
?csp --
Checks stack pointer against value saved by !CSP
?do w1 w2 --
Begins a ?DO .. LOOP to be executed 0 or more times
?dup n -- n n | 0
Duplicates n if it is non-zero
?empty stack -- flag
True if the user stack is empty
?enough n --
Aborts if the stack contains fewer than n numbers
?exec --
Aborts if not interpreting
?execute acf/0 --
EXECUTE acf if it is not FALSE
?exit flag --
EXIT if the flag is not not FALSE
?leave flag --
Exits from a DO .. LOOP if flag is nonzero
?line n --
New line if fewer than n spaces left on this one
?missing flag --
Aborts if flag is nonzero
?negate n1 n2 -- n1 | -n1
Negates n1 if n2 is less than 0
?pairs n1 n2 --
Aborts if n1 is not equal to n2
?stack --
Aborts if the stack pointer is out of range
?to-column length col --
Advances output to indicated column or starts a new line
@ addr -- n
Fetches a number from addr
@execute addr --
Executes the word contained in a variable
[ --
Begins interpreting
[""] -- pstr ccc
Collects a word from the input stream and compiles it as a string
["] -- pstr ccc"
Collects a string delimited by " from the input stream and compiles it
['] -- addr name
Compiles the compilation address of a word
[char] -- char ccc
Numerical value of first ascii character of next word
[compile] -- name
Compiles the next word even if it's immediate
[else] --
Conditional useable while interpreting
[if] [ flag ] --
Conditional usable while interpreting
[ifdef] -- name
Continues interpreting if word is defined
[ifndef] -- name
Continues interpreting if word is not defined
[then] --
Terminates an interpreted conditional expression
\ -- rest-of-line
Skips the rest of the line
\dtc --
Does nothing
\itc --
Ignores the rest of the line
\needs -- name rest-of-line
Interprets the rest of the line if needed-word is not already defined
] --
Begins compilation
]code -- sys name
Stops assembling within a colon definition
^ --
abort --
Aborts current execution and interprets keyboard commands
abort" flag -- ccc"
Conditional abort with message
abs n -- u
Absolute value
access -- filename attributes
Set an objects access type
activate task --
Activate "task" to run the following code.
addr -- name
tells the data address of an object
adr rx addr --
ARM Assembler macro
again --
Ends a BEGIN .. AGAIN loop
alias -- new-name existing-name
Creates a new name for an existing word
align --
Makes sure the dictionary pointer is on a machine word boundary
aligned addr1 -- addr2
Adjusts an address to a machine word boundary
aligning? -- addr
flag, true means assembler does aligning on its own
allocate nbytes -- addr flag
Allocates nbytes of memory and return its address and a flag
allot n --
Allocates space in the dictionary
also --
Extends the search order
alu-instructions r-dest r-op1 op2{r-op2|imm} --
Group of CPU instructions with a common syntax
and n1 n2 -- n3
Logical and
another? -- [ anf ] more?
Selects next word in vocabulary
append-open name-pstr --
Opens file for appending
append-to-file -- filename
Temporarily redirects output to the end of a file
appending -- filename
Opens file for appending
arm-assembler --
Switching to the ARM specific assembler vocabulary
arm-assembler --
Vocabulary containing assembler words
array n1 --
Define an array of n1 cells
asm-allot n --
Allocates space in the code dictionary
assembler --
Switching to the assembler vocabulary
astring -- addr
allocate a temporary string
at-xy column line --
Moves the cursor to line,column on the screen
at-xy? -- column line
Gets the cursor position in the current terminal
available -- size
get the largest available block in heap
backspaces n --
Outputs n backspaces
base -- addr
USER variable containing number base
beep --
Rings the bell
begin --
Begins a BEGIN .. WHILE .. REPEAT, BEGIN .. UNTIL or BEGIN AGAIN loop
bell -- n
The ascii code for the bell character
between n min max -- f
True if min <= n <= max
big-endian --
Switches assembler to big-endian target code
binary --
Sets the number base to two
bitclear bit# addr --
Clears bit number bit# in the array at addr
bitset bit# addr --
Sets bit number bit# in the array at addr
bittest bit# addr -- flag
True if bit number bit# in the array at addr is set
bl -- n
The ascii code for the space character; decimal 32
blank addr u --
Sets u bytes of memory to space
blk -- addr
USER variable containing input block number; Implemented in extend.block
block u -- addr
Gets mass storage block number u; Implemented in extend.block
blword -- pstr ccc
Gets a space-delimited string and return it as a packed string
body> apf -- acf
Finds compilation address from parameter field address
bounds addr1 len -- addr2 addr1
Converts address and length to endaddr startaddr
bpoff --
Removes all breakpoints from the list.
bpon --
Installs breakpoints in preparation for beginning execution
branch --
High-level unconditional branch
branch addr --
bs -- n
The ascii code for the backspace character
buffer u -- addr
Gets mass storage buffer number u; Implemented in extend.block
buffer: n -- addr
Defines a buffer
bug --
Vocabulary containing debugger words
bye --
Exits from Forth
byte --
modifier for ARM Assembler
c! n addr --
Stores a byte at addr
c, n --
Places a byte in the dictionary
c; --
Finishes an assembly language word and automatically assembles NEXT
c; --
Finishes an assembly language word and automatically assembles NEXT
c@ addr -- n
Fetches a byte from addr
canonical pstr -- pstr
Converts a packed string to lower case
caps -- addr
USER variable controlling upper case/lower case sensitivity
caps-comp addr1 len1 addr2 len -- n
Compares two strings ignoring case. n is 0 if they are the same
carret -- n
The ascii code for the carriage return character
case selector -- selector
Begins a CASE ... ENDCASE conditional
catch i*x xt -- j*x 0 | i*x n
Execute xt after pushing an exception frame
cd -- directory
Changes the current directory
cdis acf --
Disassembles the code word at acf
cell+ addr1 -- addr2
Increases addr1 by one cell.
cells n1 -- n2
Calculates the number of n1 cells.
cells+ addr1 n -- addr2
Increases addr by n cells.
char -- char ccc
Numerical value of first ascii character of next word
char+ addr1 -- addr2
Increases addr1 by one character.
chars n1 -- n2
Calculates the number of n1 characters.
chars+ addr1 n -- addr2
Increases addr by n characters.
clear ??? --
Empties the data stack
clearstack user-stack --
Empties a user stack
close-files --
Closes all the open files
cmove addr1 addr2 u --
Copies u bytes from addr1 to addr2
cmove> addr1 addr2 u --
Copies u bytes from addr1 to addr2
cnot c1 -- c2
8-bit logical inversion
code -- name
Starts the definition of an assembly language word
code -- name
Starts the definition of an assembly language word
code[ -- sys name
Starts assembling within a colon definition
cold --
Initialises the Forth system when it is first started
cold-code --
Code executing when booting Forthmacs
cold-hook --
Place to install user-defined initialization code
command-completion --
Vocabulary containing helper words for the command completion feature
comp addr1 len1 addr2 len2 -- n
Compares two strings including case. n is 0 if they are the same
compare addr1 u1 addr2 u2 -- n
Compares two strings, based on CAPS. n is 0 if they are the same
compile, acf --
Compiles an execution token into the dictionary
compile-do-defined acf n --
Called to handle a predefined word during compilation
compile-do-dliteral d --
Called to handle number during compilation
compile-do-fliteral f --
Called to handle floating numbers during compilation
compile-do-literal n --
Called to handle number during compilation
compile-do-undefined pstr --
Called to handle an undefined word during compilation
conditions --
constant n -- name
Defines a constant
context -- addr
Array of vocabularies to search
continue --
Continues after a breakpoint.
control -- char ccc
Control character number of first character of next word
convert ud1 addr1 -- ud2 addr2
Converts a string to a number
copy -- source-file destination-file
Copies source-file to destination-file
count pstr -- addr +n
Unpacks a packed string
cr --
Terminates a line on the display and goes to the next line
crash --
Initial action for words defined by DEFER
create -- name
Generic defining word
creset byte-mask addr --
Clears bits within the byte at addr
csearch c start-addr end-addr -- loc true | false
Searches for the byte c between start-addr and end-addr
cset byte-mask addr --
Sets bits within the byte at addr
cstart addr --
Starts tracer at addr
cstr pstr -- cstr-addr
Converts packed string to C string
cstrlen cstr-addr -- len
Length of a null-terminated C string
ctoggle byte-mask addr --
Inverts the masked bits within the byte at addr
current -- addr
Variable containing compilation vocabulary
cursor-off --
Turns off the display cursor
cursor-on --
Turns on the display cursor
d# --
Interprets the next word or number in hex mode
d# -- ?
Interprets the next word or number in decimal mode
d+ d1 d2 -- d3
d3 is the arithmetic sum of d1 plus d2
d- d1 d2 -- d3
d3 is the result of subtracting d1 from d2
d. d --
Displays a double number
d.r d +n--
Displays a double number in a fixed width field
d0< d -- flag
flag is true if d is less than zero
d0= d -- flag
flag is true if d is zero
d2* d1 -- d2
d2 * 2
d2/ d1 -- d2
d2 / 2
d< d1 d2 -- flag
flag is true if d1 is less than d2
d> d1 d2 -- flag
flag is true if d1 is greater than d2
dark --
Use inverse video for future text, i.e. white-on-black
debug -- forth-word"
Start debugging a forth-level word outside the kernel.
debug-off --
The debugger is switched of completely
decimal --
Set number base to 10
decr reg n# --
default-task-size -- size
A reasonable size for most new tasks
defer -- name
Defining word for forward references or execution vectors
defined -- pstr 0 | acf n name
Finds compilation address of word from the input stream
definer acf -- definer-acf
Finds the word which defined the word at acf
definitions --
Sets compilation vocabulary
del -- filename
Deletes a file
delete -- filename
Deletes a file
delete-char --
Deletes the character under the cursor from the screen
delete-line --
Deletes the current line from the screen
delimiter -- addr
USER variable containing the actual delimiter found by WORD
depth -- +n
How many numbers on stack?
df --
Show free space on drive
digit char base -- digit true | char false
Converts a character to a digit
dir -- pattern
Displays all filenames which match the pattern.
dis addr --
Disassembles starting at addr
dispose --
remove all links into transient address space
dmax d1 d2 --d3
d3 is the greater of d1 and d2
dmin d1 d2 --d3
d3 is the lesser of d1 and d2
do n1 n2 --
Begins a DO .. LOOP
do-defined acf n -- ??
Called to handle a predefined word during interpreting or compilation
do-dliteral d -- ??
Called to handle number during interpreting or compilation
do-entercode --
Prepares the runtime code part in a create ... ;code definition
do-fliteral d -- ??
Called to handle float numbers during interpreting or compilation
do-literal d -- ??
Called to handle number during interpreting or compilation
do-undefined pstr --
Called to handle an undefined word during interpreting or compilation
dodoesaddr -- addr
Variable containing the address of the dodoes routine
does> -- addr
Starts the run-time clause for defining words
dolink --
modifier for ARM assemblers BRANCH instruction
double? -- flag
True if the number that was just input had a decimal point at the end
down --
Moves the cursor down one line
dp -- addr
User variable holding top of dictionary
dpl -- addr
Variable containing the position of the decimal point in last number input
drop n --
Removes n from the stack
dst? -- flag
True if daylight savings time
du addr -- addr+64
Displays 64 bytes of memory starting at addr
du. ud --
Displays an unsigned double number
du.r ud +n--
Displays an unsigned double number in a fixed width field
du< ud1 ud2 -- flag
flag is true if and only if ud1 is less than ud2
dump addr len --
Displays len bytes of memory starting at addr
dup n -- n n
Duplicates n.
editor --
Not Implemented
else --
Executes the following code if IF failed
emit char --
Displays the character
emit1 char --
The Default implementation of EMIT
empty-buffers --
Unassigns all block buffers; Implemented in extend.block
end-code --
Ends an assembly language definition without assembling NEXT
end-code --
Ends an assembly language definition without assembling NEXT
end-string-array --
Finishes the definition of a string array
endcase selector --
Terminates a CASE ... ENDCASE conditional
endof --
Terminates an OF ... ENDOF clause within a CASE ... ENDCASE conditional
entercode --
Start assembling at once
entry -- addr
USER variable used to implement multitasking
env-area -- addr
Pointer to Forthmacs module memory
environment? c-addr u -- false | i*x true
looks for environment data
eof -- n
Value returned by FGETC upon end of file
eof? -- flag
Flag is true when end-of-file is reached
erase addr u --
Sets u bytes of memory to 0
erase-screen --
Clears the screen
errno -- addr
USER variable holding the last error id
error-output --
Selects the error output stream
evaluate addr len --
Interpret from a string
even n1 -- n2
Adjusts a number to make it even. n2 >= n1
except -- vocabulary
Removes vocabulary from the search list
exec -- program-filename command-tail
Executes a program or obey file
execute acf --
Executes the word whose compilation address is on the stack
exit --
Returns from the current word
exit? -- flag
True if the user wants the output to be terminated
expect addr +n --
Gets a line of input from the keyboard and stores it at addr
false -- 0
The value FALSE, which is 0
fclear ??? --
Empties the floating stack
fclose fd --
Closes a file
fcount -- pattern
counts number of files and their length
fence -- addr
USER variable containing the maximum FORGETable address
fexit --
Ignores the rest of the current input file
fflush fd --
Writes out buffered bytes to file
fgetc fd -- byte
Reads a byte from a file
fgetline addr fd -- addr true | false
Reads a line from a file, false if file at EOF
fgets addr count fd -- nread
Reads a string from a file
fgettill pstr delim fd -- pstr
Reads a delimited string from a file
fgetword pstr fd -- pstr
Read a space-delimited string from a file
file! byte addr fd --
Writes a byte to a file
file-exists? name-pstr -- flag
True if the named file already exists
file-protection -- addr
Variable containing the attributes for newly-created files
file@ addr fd -- byte
Reads a byte from a file
files -- pattern
Lists all objects in a directory
fill addr u byte --
Sets u bytes of memory to byte
find pstr -- addr n
Finds a word in the dictionary
flip w1 -- w2
Swaps the bytes within a 16-bit word
fload -- filename
Interprets a file
flush --
Saves the contents of mass storage buffers; Implemented in extend.block
flush-cache --
Flushes the CPU cache
fm/mod d.dividend divisor -- rem quot
floored division ; normal remainder/quotient
follow voc-acf --
Prepares to scan a vocabulary; see ANOTHER?
fopen filename-pstr mode -- fd
Opens a file
forget -- name
Removes word from dictionary
fork task-apf --
obsolete!
forth --
The main vocabulary
fp! addr --
Changes the floating stack pointer
fp0 -- addr
User variable containing the address of the bottom of the floating point stack
fp@ addr --
Reads the floating stack pointer
fputc byte fd --
Writes a byte to a file
fputs addr count fd --
Writes a string to a file
free addr -- flag
Frees a memory block allocated by ALLOCATE
fseek addr fd --
Sets the position within a file
fseek-from-end offset fd --
Sets position relative to the end of a file
fsize fd -- size
Finds the size of a file
fskiptill char fd --
Skips past the next occurrence of char in the file fd
fstr cstr-addr -- pstr
Converts a C string to a packed string
ftell fd -- addr
Finds the current position within a file
ftrace --
Display the return stack after a crash
get-cursor-status -- n
Gets the cursor-status
get-link -- reg --
ARM assembler macro
get-ticks -- n
Get the ticker increasing every MS/TICK mseconds.
getenv fstr -- fstr/0
find out the RISC OS system variable fstr. FALSE if not found
go --
Continues after a breakpoint.
h# -- ?
Interprets the next word or number in hex mode
handle-address --
Handler for address-error interrupts
handle-breakpoint --
handler for OS_Breakpt
handle-data --
handler for data access errors
handle-div0 --
handler for divide by zero errors
handle-error --
handler for user defined errors
handle-escape --
handler for escape conditions
handle-prefetch --
handler for prefetch MMU errors
headerless --
the following definitions will be headerless
headers --
include headers in definitions, default
here -- addr
Address of top of dictionary
hex --
Sets the number base to 16
hidden --
Vocabulary containing words used only to implement other words
hide --
Makes the most recent word invisible
history-expect addr +n --
The Default implementation of EXPECT
hold char --
Inserts the char in the pictured numeric output string
hop --
Single steps at a single subroutine nesting level
hops n --
Executes HOP n time
i -- n
Loop index
if flag --
Executes following code if flag is true
ifd -- addr
Variable for input file descriptor
immediate --
Marks the last word as immediate
immediate? acf -- flag
True if word is immediate
incr reg n# --
init-relocation --
Initialises the relocation table
init-user --
Initialises the USER area at startup time
input-file -- addr
User Variable containing the file descriptor of the interpreter input stream
insert-line --
Inserts a new line on the screen at the cursor position
interactive? -- flag
True if the input stream is coming from the keyboard
interpret --
Interprets the input stream
interpret-do-defined acf n -- ??
Called to handle a predefined word during interpreting
interpret-do-dliteral d -- d
Called to handle number during interpreting
interpret-do-fliteral d -- d
Called to handle float number during interpreting
interpret-do-literal n -- n
Called to handle number during interpreting
interpret-do-undefined pstr --
Called to handle an undefined word during interpreting
invert n1 -- n2
One's complement
ip -- n
portable name for the instruction pointer
is action-acf -- name
Installs a new action in a DEFER word
j -- n
Loop index for next enclosing loop
k -- n
Loop index for second enclosing loop
key -- char
Reads a character from the keyboard
key1 -- char
The default implementation of KEY
key? -- flag
True if a key has been typed on the keyboard
keys-forth --
Vocabulary containing keystroke definitions for the command line editor
kill-line --
Clears the current line to the right of the cursor
kill-screen --
Clears the screen from the cursor position onward
l>name alf -- anf
Finds the name field address from link field address
label -- name
Begins the creation of a sequence of assembly language instructions
label -- name
Begins the creation of a sequence of assembly language instructions
last -- addr
USER variable containing the name field address of the last word created
lastacf -- acf
The compilation address of the last word created
lcc char -- lower-case-char
Converts char to lower case
ldm rx1 rx2 .. rxn n# r-adr --
ARM assembler instruction
ldr r-data r-adr operand2 --
ARM assembler instruction
leave --
Exit from DO .. LOOP
left --
Moves the cursor left one column
light --
Use normal video for future text, i.e. black-on-white
limit -- addr
Value pointing to the high end of the dictionary space
linefeed -- n
The ascii code for the line feed character
link -- addr
USER variable containing the address of the next task
link! link addr --
Stores a dictionary link
link, link --
Places a link in the dictionary
link> alf -- acf
Finds compilation address from link field address
link@ alf -- link
Fetches a dictionary link
list u --
Displays the contents of a mass storage block. Implemented in extend.block
literal -- n
Compiles a number
literal? pstr -- pstr false | n true
Is the packed string a number?
little-endian --
Switches assembler to little-endian target code
ll -- objpattern
Lists file information about objpattern
lmargin -- addr
Variable containing left margin for output formatting
load u --
Interprets a mass storage block; Implemented in extend.block
lobyte n -- c
Masks off high bits, leaving the least-significant byte
local task user-variable -- adr
Find an address within another task
locals| ??? xxx yyy ... zzz -- ???
Defines up to 30 local variables, variable list ends with |
loop --
End of DO .. LOOP
lose --
Compiled in place of an undefined word; aborts
lower addr len --
Converts a character array to lower case
ls -- pattern
Lists all objects in a directory
lshift n1 cnt -- n2
Left shifts n1 by count places
lwsplit n -- w.low w.high
Split a cell into two words
m* n1 n2 -- d
32 bits times 32 bits signed multiply, result has 64 bits
m*/ d1 n1 2 -- d2
As */ but first parameter is double
m+ d1 n -- d2
n is added to the double d1 giving a double result
m/mod d.dividend n.divisor -- n.rem n.quot
Signed 32/ ; normal remainder/quotient
main-heap -- addr
The address of the heap
main-task -- addr
The address of the USER area for the initial task
main-task -- task
The task that normally runs the Forth interpreter
make pstr -- flag
Create a file. Flag is true if the operation succeeded
many --
Re-interpret this command line until a key is typed
marked --
Use marked video for future text, i.e. red-on-white
max n1 n2 -- n3
n3 is maximum of n1 and n2
max-image -- size
The size in bytes of the maximum dictionary that may be relocated
md -- directory
Makes a new directory
min n1 n2 -- n3
n3 is minimum of n1 and n2
mkdir -- directory
Makes a new directory
mla r-dest r-op1 r-op2 r-add
mod n1 n2 -- n3
Remainder of n1/n2
modify -- n
The number signifying to FOPEN that the file is to be read and written
more -- filename
Displays the contents of the file, pausing after each page
move addr1 addr2 u --
Copies u bytes from addr1 to addr2
ms n --
Wait for n msec
ms/tick -- n
milliseconds per tick
mu/mod ud n -- n.rem ud.quot
Divides double by normal giving normal remainder and double quotient
mul r-dest r-op1 r-op2
multi --
Enables multitasking
mv -- old-filename new-filename
Changes the name of old-filename to new-filename
n>link anf -- alf
Finds link field from name field
name> anf -- acf
Finds compilation address from name field
needs -- name filename
Loads file if name is not already defined
negate n1 -- n2
Changes the sign of n1
new-file filename-pstr --
Creates a new file and opens it for writing, descriptor in OFD
newline -- char
The character which terminates a line
next --
ARM Assembler macro, assembles the Forth address interpreter code
nip n1 n2 -- n2
Discards the second element from the data stack
noop --
Does nothing
nop --
not n1 -- n2
One's complement
now -- seconds minutes hours
The current time of day
npatch -- replacement-number old-number word-to-patch
Substitute replacement for old in word-to-patch
nullstring -- pstr
A packed string containing no bytes
number pstr -- d
Converts a packed string to a double number or aborts
number? pstr -- d flag
Converts a packed string to a number
nuser -- name
Defines and allocates space for a USER variable
octal --
Sets the number base to eight
of selector test-value --
Begins an OF ... ENDOF clause within a CASE ... ENDCASE conditional
ofd -- addr
Variable for output file descriptor
off addr --
Stores false at addr
ok --
Does nothing
on addr --
Stores true at addr
only --
Sets the minimum search order
open-error filename --
Handle an open-file error condition
or n1 n2 -- n3
Logical or
order --
Displays the vocabulary search order
origin -- addr
The address of the start of the Forth system
over n1 n2 -- n1 n2 n3
n3 is a copy of n1.
over-vocabulary action-acf voc-acf --
Scans a vocabulary executing action-acf for each word
p" -- pstr ccc"
Collects a string from the input stream, storing it as a packed string
pack addr len pstr -- pstr
Makes a packed string from addr len, placing it at pstr
pad -- addr
The address of a scratch area used to temporary storage
patch -- replacement-word old-word word-to-patch
Substitute replacement for old in word-to-patch
pause --
Gives other tasks a chance to run
pause --
Give other tasks a chance to run
pc -- n
portable name for the pc register
pc -- n
The Program Counter saved at the last breakpoint/exception.
pcr addr -- pc offset
ARM assembler macro
perform addr-of-acf --
Executes the word contained in a variable
pick +n -- n2
Copies n-th number
place addr len pstr --
Makes a packed string from addr len, placing it at pstr
pointer addr -- name
Defines a pointer
pop user-stack -- n
Pops a number off a user stack
postpone -- name
Append the compilation semantics of name to the current definition
previous --
Removes the CONTEXT vocabulary from the search order
printable? char -- flag
True if character is printable
prompt --
Displays a prompt on the screen
protect addr -- flag
Protects an allocated block of memory
ps-size -- n
The maximum size of the data stack in bytes
psr -- n
The Status Register saved at the last breakpoint.
push n user-stack --
Pushes a number on a user stack
pwd --
Displays the name of the current directory
quit --
Interprets keyboard commands
r0 -- n
Register r0 saved at the last breakpoint
r> -- n
Moves a number from the return stack to the data stack
r@ -- n
Copies the top of the return stack to the data stack
rd -- directory
Deletes a directory
read -- n
The number signifying to FOPEN that the file is to be opened for reading
read-open filename-pstr --
Opens the file for reading, storing its file descriptor in IFD
reading -- filename
Opens the file for reading, storing its file descriptor in IFD
recurse -
calls the word being defined recursively
recursive --
Allows a word being defined to call itself recursively
registers -- addr
address of buffer holding registers after crashing
relocation-map -- addr
The address of the relocation table
rename -- old-filename new-filename
Changes the name of old-filename to new-filename
repeat --
Ends a BEGIN .. WHILE .. REPEAT loop
resident --
switch here to resident address space
resize addr1 nbytes -- addr2 flag
resize the memory block at addr1 to n bytes, returns addr2 and a flag
restore-output --
Goes back to the old output stream after ERROR-OUTPUT
return --
reveal --
Makes the most recent word visible
right --
Moves the cursor right one column
rm -- filename
Deletes a file
rmargin -- addr
Variable containing right margin for output formatting
rmdir -- directory
Deletes a directory
roll +n --
Rotates +n numbers
root --
The vocabulary selected by ONLY
rot n1 n2 n3 --- n2 n3 n1
Rotates 3 numbers
rp -- n
portable name for the return stack pointer
rp! addr --
Changes the return stack pointer
rp0 -- addr
A variable containing the address of the bottom of the return stack
rp@ -- addr
The address of the top of the return stack
rs-size -- n
The maximum size of the return stack in bytes
rshift n1 cnt -- n2
Rights shift count n1 by places
rstrace --
Displays the words nested on the return stack
s --
s" -- addr len ccc"
Collects a string from the input stream
s. n --
Displays n as a signed number
s>d n -- d
converts a cell number to a double
save-buffers --
Saves the contents of mass storage buffers; Implemented in extend.block
save-forth filename-pstr --
Saves an executable Forth image
save-string pstr1 -- pstr2
Moves a string somewhere else
saved-ip -- addr
USER variable containing the interpreter pointer for an inactive task
saved-rp -- addr
USER variable containing the return stack pointer for an inactive task
saved-sp -- addr
USER variable containing the stack pointer for an inactive task
scr -- addr
Variable with the number of last block LISTED; Implemented in extend.block
sdepth user-stack -- depth
The number of items on a user stack
seal --
Restricts the search order
search n start end -- loc true | false
Searches for n between start-addr and end-addr
see -- name
Decompiles the named word
set-cursor-status n --
Sets the cursor-status
set-relocation-bit addr -- addr
Sets the relocation bit corresponding to the address addr
set-task ip task --
Activate a task with its ip starting at ip
settype -- filename filetype
Set an objects filetype
sh -- program-filename command-tail
Executes a program or obey file
sh[ -- program-filename command-tail]
Executes a program or obey file
showcrash --
Displays the machine state saved from the last crash
showcrash --
Displays all the saved information at the last breakpoint
sift pstr --
Finds all words which contain pstr as part of their name
sifting -- ccc
Finds all words which contain ccc as part of their name
sign n --
Sets sign of pictured output
sindex addr1 len1 addr2 len2 -- n
Finds the offset within array 2 where array 1 first occurs
single --
Turns off multitasking
single --
Disables multitasking
size -- pattern
Shows the sizes of the files matching pattern
skip --
Continues after a trap instruction, skipping that instruction
skipstr -- addr len
Used to implement words with in-line character arrays
sleep task --
Make another task stop running
sm/rem d.dividend divisor -- rem quot
symmetric division ; normal remainder/quotient
sp -- n
portable name for the stack pointer
sp -- n
Stack Pointer saved at the last breakpoint or exception
sp! addr --
Changes the data stack pointer
sp0 -- addr
Variable containing the address of the bottom of the data stack
sp@ -- addr
The address of the top of the data stack
space --
Displays a space character
spaces +n --
Displays n spaces
span -- addr
Variable containing the number of characters read by EXPECT
stack: #bytes -- name
Defines a user stack with #bytes of storage space
start acf task --
Activate a task running acf
state -- addr
Variable that is nonzero in compile state
status --
User-settable action to be performed before prompting for input
step --
Single steps, executing the next assembly language instruction.
steps n --
Single steps, executing the next n assembly language instructions.
stm rx1 rx2 .. rxn n# r-adr --
ARM Assembler instruction
stop --
Make the current task stop running
str r-data r-adr operand2 --
ARM assembler instruction
string-array -- name
Begins the definition of a string array
string-fopen addr len -- fd
Opens a file for a memory string
substring? addr1 len1 addr2 len2 -- flag
True if string1 is a substring of string22
swap n1 n2 -- n2 n1
Exchanges the top 2 stack entries.
swi swi# --
swix swi# --
swp r-dest r-base r-source --
sync-cache high-adr lo-adr --
Flushes the CPU cache and synchronizes code in a specific address space
sys-(key? -- flag
The Default implementation of KEY?
sys-cr --
Outputs a carriage return & linefeed; adjusts #LINE & #OUT
sys-emit char --
Displays the character
sys-expect addr +n --
Simple implementation of EXPECT
sys-key -- char
The Default implementation of KEY
sys-type addr +n --
The Default implementation of TYPE
syscall: n -- name { p1 p2 -- r1 r2 }
defines a function name calling swi n, symbolic parameters follow
system --
Vocabulary containing operating system interface words
t --
tabstops -- addr
Variable containing distance between output fields
tail -- filename
Displays the last 1000 bytes of the file
task-ps-size -- u
A good size for the parameter stack for a new task
task-rs-size -- u
A good size for the return stack for a new task
task: -- name
Create a new task
terminal: -- terminal-name
Define a terminal
then --
Terminates an IF ... ELSE ... THEN
throw k*x n -- k*x | i*x n
If n is <>0 pop the exception frame and continue after the corresponding throw
tib -- addr
The address of the Text Input Buffer
time-zone -- minutes-west-of-GMT
The local time zone
times n --
Re-interprets the command line n times
title --
Displays the name and version of the Forth system
to obj/n -- name
"write" object-data to an object or
to-column column --
Advances the output to the indicated column
to-current -- word
Put word into current
to-file -- filename
Temporarily redirects output to a file
today -- day month year
Today's date
toggle addr byte-mask --
Inverts the masked bits within the byte at addr
token! addr2 addr1 --
Stores a relocatable address at addr1
token, addr --
Places a relocatable address in the dictionary
token@ addr1 -- addr2
Fetches a relocatable address
top -- n
portable name for the top of stack register
top! n user-stack --
Replaces the top number on a user stack
top@ user-stack -- n
Gets the top number from a user stack without popping it
trace -- name
Start tracing a primitive
transient --
switch here to transient address space
true -- -1
The value true, which is -1
tsearch addr start end -- loc true | false
Searches for address addr between start-addr and end-addr
tuck n1 n2 -- n2 n1 n2
Copies the top of the stack underneath the second item
tuser -- name
Defines and allocate space for a USER variable to contain an address
type addr +n --
Displays n characters
type1 addr +n --
The Default implementation of TYPE
u* u1 u2 -- u3
Unsigned u1*u2
u. u --
Displays an unsigned number
u.r u +n --
Prints an unsigned number in fixed width field
u2/ u1 -- u2
Logical right shift
u< u1 u2 -- flag
Unsigned version of < .
u<= u1 n2 -- flag
True if u1 is less than or equal to u2
u> u1 n2 -- flag
True if u1 is greater than u2
u>= u1 n2 -- flag
True if u1 is greater than or equal to u2
ualloc size -- new-user-number
Allocates space in the USER area
um* u1 u2 -- ud
unsigned times unsigned multiply, result has 64 bits
um/mod ud.dividend un.divisor -- un.rem un.quot
Unsigned 64/ ; normal remainder/quotient
umax u1 u2 -- u3
Unsigned maximum
umin u1 u2 -- u3
Unsigned minimum
unaligned-! addr -- n
Store to an unaligned address
unaligned-@ addr -- n
Fetch from an unaligned address
unnest --
Returns from a colon definition
until flag --
Continues executing a BEGIN .. UNTIL loop until flag is true
up --
Moves the cursor up one line
up -- n
portable name for the user pointer
up -- n
The User-area Pointer Register saved at the last breakpoint.
up! addr --
Changes the starting address of the USER area
up0 -- addr
User variable containing the starting address of the USER area
up@ -- adr
The address of the user area for the current task
upc char -- upper-case-char
Converts char to upper case
update --
Marks a mass storage buffer as modified; Implemented in extend.block
upper addr len --
Converts a character array to upper case
user offset -- name
Defines a variable at the given offset in the USER area
user-size -- n
The size in bytes of the USER area.
user-size -- u
A good size for the user area for a new task
value n -- name
Defines a value
variable -- name
Defines a variable
vfind pstr voc-ptr -- acf 1 | acf -1 | pstr false
Searches for a word in a single vocabulary
voc-link -- addr
USER variable containing the address of the last vocabulary created
voc> voc-alf -- voc-acf
Converts vocabulary link address to compilation address
vocabulary -- name
Defines a new vocabulary
vocs --
Displays the names of all vocabularies in the system
wait n task --
Make another task waiting for n ms
wake task --
Make another task start running
warm --
Restarts Forth after a hardware exception
warm-hook --
Place to install a user-defined handler for hardware exceptions
warning -- addr
USER variable controlling "isn't Unique" messages
wflip n1 -- n2
Swaps the 16-bit halves of a 32-bit cell
whatis -- name
Displays a brief description of the named word
where --
Prints a message telling where in the input stream you are
whereis -- xxx-name
Tells the vocabulary of word xxx-name
while flag --
Continues execution of begin .. while .. repeat loop while flag is true
why --
Tell the reason for the last OS error
within n min max -- f
True if min <= n < max
wljoin w.low w.high -- n
Joins two 16-bit words to form a /cell
word char -- pstr
Collects a char-delimited string from the input stream
word-bounds acf -- apf addr
Finds the start and end of a colon definition's body
word-type acf -- n
give a word-type identifier
words --
Displays the words in the context vocabulary
write -- n
The number signifying to open that the file is to be written
write-open filename-pstr --
Opens the file for writing, storing its file descriptor in ofd
writing -- filename
Creates a new file and open it for writing, descriptor in OFD
xor n1 n2 -- n3
Exclusive or